<?php 
if (!empty($banners) and count($banners) > 0): ?>
    <table width="100%" class="tabela-padrao">
        <thead>
            <tr>
                <th width="600px">Imagem do banner</th>
            </tr>
        </thead>
        <tbody>
            <?php
            foreach ($banners as $banner):
                echo "<tr>";
                echo "<td><img src=\"http://localhost:8888/Sites/flor/loja/uploads/banners/" . $banner["Banner"]["path"] . "\" width=\"600px\"/>";
                echo "<a onclick=\"deletar(" . $banner["Banner"]["id"] . ")\" class=\"size16 excluir\" title=\"Excluir\">Excluir</a>";
              //  echo "<td>";
               // echo "<a href=\"" . Dispatcher::baseUrl() . "/cidades/editar/" . $cidade["Cidade"]["id"] . "\" class=\"size16 editar\" title=\"Editar\">Editar</a>";
                echo "</td>";
                //echo "</tr>";
            endforeach;
            ?>        
        </tbody>
    </table>
<?php else: ?>
    Nenhum banner cadastrado
<?php endif; ?>
<script type="text/javascript">
    function deletar (id){
        if (confirm("Deseja excluir esse banner?")){
            window.location = "<?= Dispatcher::baseUrl() ?>/banners/excluir/"+id;
        }
    }
</script>